package com.example.demo.config;/**
 * @author Daog
 * @create 2020 -11 -2020-11-02 16:49
 * @description 功能描述
 */

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @program: demo_boot
 *
 * @description:
 *
 * @author: Dong
 *
 * @create: 2020-11-02 16:49
 **/
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {

        registry.addResourceHandler("/myPic/**").addResourceLocations("file:D:\\springboot\\pic\\");
}
}
